<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>GET请求示例</title>
</head>
<body>
<h1>点击按钮发送GET请求</h1>
<button onclick="sendGetRequest()">发送GET请求</button>

<script>
    function sendGetRequest() {
        var xhr = new XMLHttpRequest();
        xhr.open("GET", "http://localhost:8081/docker/test1", true);  // 修改这里的URL
        xhr.onreadystatechange = function () {
            if (xhr.readyState === 4 && xhr.status === 200) {
                console.log("GET请求成功");
            }
        };
        xhr.send();
    }
</script>
</body>
</html>
